package db;

import java.util.ArrayList;

/**
 * Central class for all the parsed data, a country has cities/places, general
 * information and different year data sets.
 * 
 * @author markus
 * 
 */
public class Country{

	private String name; // working
	private ArrayList<String> altName = new ArrayList<String>(); // working
	private Double area; // read + write
	private String mapLink; // read + write
	private String flagLink; // read + write
	private String coords; // read + write
	private String location; // read + write
	private String hazards; // read + write
	private String info; // read + write
	private String shortName; // read + write
	private String continent; // read + write
	private ArrayList<Border> borders = new ArrayList<Border>();
	private ArrayList<String> orgs = new ArrayList<String>(); // (local orgs)
																// should work
	private Place capital;
	private ArrayList<Year> years = new ArrayList<Year>();

	/**
	 * Constructor for a new country identified with the name.
	 * 
	 * @param name
	 */
	public Country(String name) {
		this.shortName = name;
	}

	/**
	 * Add new year object.
	 * 
	 * @param year
	 *            <Year>
	 */
	public void addYear(Year year) {
		years.add(year);
	}

	/**
	 * Return ArrayList with all year data of one country.
	 * 
	 * @return years ArrayList<Year>
	 */
	public ArrayList<Year> getYears() {
		return years;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String mname) {
		this.name = mname;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the altName
	 */
	public ArrayList<String> getAltName() {
		return altName;
	}

	public void addAltName(String name) {
		altName.add(name);
	}

	/**
	 * @param area
	 *            the area to set
	 */
	public void setArea(Double area) {
		this.area = area;
	}

	/**
	 * @return the area
	 */
	public Double getArea() {
		return area;
	}

	/**
	 * @param mapLink
	 *            the mapLink to set
	 */
	public void setMapLink(String mapLink) {
		this.mapLink = mapLink;
	}

	/**
	 * @return the mapLink
	 */
	public String getMapLink() {
		return mapLink;
	}

	/**
	 * @param flagLink
	 *            the flagLink to set
	 */
	public void setFlagLink(String flagLink) {
		this.flagLink = flagLink;
	}

	/**
	 * @return the flagLink
	 */
	public String getFlagLink() {
		return flagLink;
	}

	/**
	 * @param hazards
	 *            the hazards to set
	 */
	public void setHazards(String hazards) {
		this.hazards = hazards;
	}

	/**
	 * @return the hazards
	 */
	public String getHazards() {
		return hazards;
	}

	/**
	 * @param info
	 *            the info to set
	 */
	public void setInfo(String info) {
		this.info = info;
	}

	/**
	 * @return the info
	 */
	public String getInfo() {
		return info;
	}

	/**
	 * @param shortName
	 *            the shortName to set
	 */
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	/**
	 * @return the shortName
	 */
	public String getShortName() {
		return shortName;
	}

	/**
	 * @param continent
	 *            the continent to set
	 */
	public void setContinent(String continent) {
		this.continent = continent;
	}

	/**
	 * @return the continent
	 */
	public String getContinent() {
		return continent;
	}

	/**
	 * @param borders
	 *            the borders to set
	 */
	public void setBorders(ArrayList<Border> borders) {
		this.borders = borders;
	}

	/**
	 * @return the borders
	 */
	public ArrayList<Border> getBorders() {
		return borders;
	}

	/**
	 * @param borders
	 *            the borders to set
	 */
	public void addBorder(String neighbor, Double length) {
		borders.add(new Border(neighbor, length));
	}

	/**
	 * @param capital
	 *            the capital to set
	 */
	public void setCapital(Place capital) {
		this.capital = capital;
	}

	/**
	 * @return the capital
	 */
	public Place getCapital() {
		return capital;
	}

	/**
	 * @param orgs
	 *            the orgs to set
	 */
	public void setOrgs(ArrayList<String> orgs) {
		this.orgs = orgs;
	}

	/**
	 * @return the orgs
	 */
	public ArrayList<String> getOrgs() {
		return orgs;
	}

	/**
	 * Add organisation to a single country.
	 * 
	 * @param name
	 */
	public void addOrg(String name) {
		orgs.add(name);
	}

	/**
	 * @param location
	 *            the position to set
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * @return the location
	 */
	public String getLocation() {
		return location;
	}

	/**
	 * @param coords
	 *            the coords to set
	 */
	public void setCoords(String coords) {
		this.coords = coords;
	}

	/**
	 * @return the coords
	 */
	public String getCoords() {
		return coords;
	}
}